/*********************************************************************************
 *      Copyright:  (C) 2017 luminqi
 *                  All rights reserved.
 *
 *       Filename:  str_cmp.c
 *    Description:  This file 
 *                 
 *        Version:  1.0.0(2017年08月24日)
 *         Author:  luminqi <958822582@qq.com>
 *      ChangeLog:  1, Release initial version on "2017年08月24日 15时26分59秒"
 *                 
 ********************************************************************************/

#include "str.h"

int str_cmp(const char *cs, const char *ct)
{
    unsigned char c1 = 'a';
    unsigned char c2 = 'a';

    while(1)
    {
        c1 = *cs++;
        c2 = *ct++;
        if(c1!=c2)
        {
            return (c1<c2)?-1:1;
        }
        if(!c1)
        {
            break;
        }
    }
    return 0;
}
